//@author A0117173L
package ui;

import static org.junit.Assert.*;

import org.junit.Test;

/**
 * 
 * JUnit testing for method in UI. Written by Liang Ye (A0117173L).
 *
 */

public class testUI {

	@Test
	public void testGuidanceDisplayAdd() {
		// These are some boundary values for add input string
		assertEquals(
				"add [description] [date] [time]  *(you can omit date or time)*",
				Main.guidanceDisplay("add"));
		assertEquals(
				"command: add / edit / remove / display / complete / pending / undo / redo / exit",
				Main.guidanceDisplay("ad"));
		assertEquals(
				"add [description] [date] [time]  *(you can omit date or time)*",
				Main.guidanceDisplay("add "));
	}

	public void testGuidanceDisplayRemove() {
		// These are some boundary values for remove input string
		assertEquals("remove [tasknumber]  /  [query]  /  [list]",
				Main.guidanceDisplay("remove"));
		assertEquals(
				"command: add / edit / remove / display / complete / pending / undo / redo / exit",
				Main.guidanceDisplay("remov"));
		assertEquals("remove [tasknumber]  /  [query]  /  [list]",
				Main.guidanceDisplay("remove "));
	}

	public void testGuidanceDisplayEdit() {
		// These are some boundary values for edit input string
		assertEquals("edit [tasknumber] [new changes]",
				Main.guidanceDisplay("edit"));
		assertEquals(
				"command: add / edit / remove / display / complete / pending / undo / redo / exit",
				Main.guidanceDisplay("edi"));
		assertEquals("edit [tasknumber] [new changes]",
				Main.guidanceDisplay("edit "));
	}

	public void testGuidanceDisplayDisplay() {
		// These are some boundary values for display input string
		assertEquals("display [query]", Main.guidanceDisplay("display"));
		assertEquals(
				"command: add / edit / remove / display / complete / pending / undo / redo / exit",
				Main.guidanceDisplay("displa"));
		assertEquals("display [query]", Main.guidanceDisplay("display "));
	}

	public void testGuidanceDisplayComplete() {
		// These are some boundary values for complete input string
		assertEquals("complete [query]  /  [tasknumber]",
				Main.guidanceDisplay("complete"));
		assertEquals(
				"command: add / edit / remove / display / complete / pending / undo / redo / exit",
				Main.guidanceDisplay("complet"));
		assertEquals("complete [query]  /  [tasknumber]",
				Main.guidanceDisplay("complete "));
	}

	public void testGuidanceDisplayPending() {
		// These are some boundary values for pending input string
		assertEquals("pending [query]  /  [tasknumber]",
				Main.guidanceDisplay("pending"));
		assertEquals(
				"command: add / edit / remove / display / complete / pending / undo / redo / exit",
				Main.guidanceDisplay("pendin"));
		assertEquals("pending [query]  /  [tasknumber]",
				Main.guidanceDisplay("pending "));
	}

}
